New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More

@aws-sdk/client-ssm

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@aws-sdk/client-ssm

AWS SDK for JavaScript Ssm Client for Node.js, Browser and React Native

3.759.0
latest
Version published
Maintainers
0
Created

What is @aws-sdk/client-ssm?

The @aws-sdk/client-ssm package is a client library for the AWS Systems Manager (SSM) service. It allows developers to interact with the SSM service programmatically to manage configuration and automation tasks. The package provides methods to send commands, manage parameters, and configure instances and applications.

What are @aws-sdk/client-ssm's main functionalities?

Managing Parameters

This feature allows you to create and manage parameters in the AWS Systems Manager Parameter Store. The code sample demonstrates how to put a new parameter into the Parameter Store.

const { SSMClient, PutParameterCommand } = require('@aws-sdk/client-ssm');
const client = new SSMClient({ region: 'us-west-2' });
const command = new PutParameterCommand({
  Name: 'parameterName',
  Value: 'parameterValue',
  Type: 'String'
});
client.send(command).then((data) => console.log(data)).catch((error) => console.error(error));

Sending Commands

This feature enables you to send commands to instances for execution. The code sample shows how to send a simple shell script command to an EC2 instance.

const { SSMClient, SendCommandCommand } = require('@aws-sdk/client-ssm');
const client = new SSMClient({ region: 'us-west-2' });
const command = new SendCommandCommand({
  InstanceIds: ['i-1234567890abcdef0'],
  DocumentName: 'AWS-RunShellScript',
  Parameters: { 'commands': ['echo "Hello World"'] }
});
client.send(command).then((data) => console.log(data.CommandId)).catch((error) => console.error(error));

Getting Command Invocation Results

This feature is used to retrieve the results of a command execution on a particular instance. The code sample demonstrates how to get the result of a command invocation.

const { SSMClient, GetCommandInvocationCommand } = require('@aws-sdk/client-ssm');
const client = new SSMClient({ region: 'us-west-2' });
const command = new GetCommandInvocationCommand({
  CommandId: 'commandId',
  InstanceId: 'i-1234567890abcdef0'
});
client.send(command).then((data) => console.log(data)).catch((error) => console.error(error));

Other packages similar to @aws-sdk/client-ssm

FAQs

Package last updated on 28 Feb 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts